ModuleInfo "Name: sedm.bullet"
ModuleInfo "Description: Wrapper for the Bullet Physics Engine"
ModuleInfo "Licence: see Bullet License"
ModuleInfo "Author: Jens [bruZard] Henschel"
import brl.blitz
import brl.linkedlist
import brl.filesystem
import sedm.std
import "bullet.lib"
_initBullet@*(gravX#,gravY#,gravZ#)S="_initBullet@12"
_shutDownBullet%(bullet@*)S="_shutDownBullet@4"
_getDynamicsWorld@*(bullet@*)S="_getDynamicsWorld@4"
_updateBullet%(bullet@*,timeStep#,maxSubSteps%,fixedTimeStep#)S="_updateBullet@16"
_createRigidBody@*(bullet@*,typ%,mass#,playerControlled%,rbsize@*,rbpos@*)S="_createRigidBody@24"
_removeRigidBodyFromWorld%(bullet@*,body@*)S="_removeRigidBodyFromWorld@8"
_deleteRigidBody%(bullet@*,body@*)S="_deleteRigidBody@8"
_getRigidBodyPosition%(body@*,vec@*)S="_getRigidBodyPosition@8"
_setRigidBodyPosition%(rigidBody@*,rbpos@*)S="_setRigidBodyPosition@8"
_getRigidBodyRotation%(body@*,quat@*)S="_getRigidBodyRotation@8"
_userControlledBody%(body@*)S="_userControlledBody@4"
_translateRigidBody%(body@*,x#,y#,z#)S="_translateRigidBody@16"
_pitchRigidBody%(body@*,x#)S="_pitchRigidBody@8"
_yawRigidBody%(body@*,y#)S="_yawRigidBody@8"
_rollRigidBody%(body@*,z#)S="_rollRigidBody@8"
CS_BOX%=1
CS_SPHERE%=2
TBullet^brl.blitz.Object{
.bBullet@*&
.btDynamicsWorld@*&
.rigidBodys:brl.linkedlist.TList&
.tempVec:sedm.std.bVector3&
-New%()="_sedm_bullet_TBullet_New"
-Delete%()="_sedm_bullet_TBullet_Delete"
+Init:TBullet(gravX#=0#,gravY#=-9.81#,gravZ#=0#)="_sedm_bullet_TBullet_Init"
-Shutdown%()="_sedm_bullet_TBullet_Shutdown"
-createRigidBody:TRigidBody(typ%,mass#,playerControlled@,rbsize:sedm.std.bVector3,rbpos:sedm.std.bVector3="bbNullObject")="_sedm_bullet_TBullet_createRigidBody"
-RigidBodyPosition:sedm.std.bVector3(rigidBody:TRigidBody)="_sedm_bullet_TBullet_RigidBodyPosition"
-PositionRigidBody%(rigidBody:TRigidBody,x#,y#,z#)="_sedm_bullet_TBullet_PositionRigidBody"
-RigidBodyRotation:sedm.std.bQuaternion(rigidBody:TRigidBody)="_sedm_bullet_TBullet_RigidBodyRotation"
-TranslateRigidBody%(body:TRigidBody,x#,y#,z#)="_sedm_bullet_TBullet_TranslateRigidBody"
-Update%(timeStep#=0.01666#,maxSubSteps%=1,fixedTimeStep#=0.01666#)="_sedm_bullet_TBullet_Update"
-userControlledBody%(body:TRigidBody)="_sedm_bullet_TBullet_userControlledBody"
-PitchRigidBody%(body:TRigidBody,x#)="_sedm_bullet_TBullet_PitchRigidBody"
-YawRigidBody%(body:TRigidBody,y#)="_sedm_bullet_TBullet_YawRigidBody"
-RollRigidBody%(body:TRigidBody,z#)="_sedm_bullet_TBullet_RollRigidBody"
}="sedm_bullet_TBullet"
TRigidBody^brl.blitz.Object{
.bRigidBody@*&
-New%()="_sedm_bullet_TRigidBody_New"
-Delete%()="_sedm_bullet_TRigidBody_Delete"
+Create:TRigidBody(bullet:TBullet,typ%,mass#,playerControlled@,rbsize:sedm.std.bVector3,rbpos:sedm.std.bVector3)="_sedm_bullet_TRigidBody_Create"
-GetPosition%(ref:sedm.std.bVector3)="_sedm_bullet_TRigidBody_GetPosition"
-SetPosition%(x#,y#,z#)="_sedm_bullet_TRigidBody_SetPosition"
-GetRotation%(ref:sedm.std.bQuaternion)="_sedm_bullet_TRigidBody_GetRotation"
-translate%(x#,y#,z#)="_sedm_bullet_TRigidBody_translate"
-userControlledBody%()="_sedm_bullet_TRigidBody_userControlledBody"
-pitch%(x#)="_sedm_bullet_TRigidBody_pitch"
-yaw%(y#)="_sedm_bullet_TRigidBody_yaw"
-roll%(z#)="_sedm_bullet_TRigidBody_roll"
}="sedm_bullet_TRigidBody"
